Disclosed is a method comprising receiving, by a first terminal device, from a second terminal device, a first message indicating a first set of resource configurations for transmission of a reference
signal to the second terminal device: transmitting, by the first terminal device, a second message indicating a second set of resource configurations for the transmission of the reference
signal to the second terminal device, wherein the second set of resource configurations are generated based at least partly on the first set of resource configurations; receiving, by the first terminal device, from the second terminal device, a third message indicating a resource configuration to be used for the transmission of the reference
signal to the second terminal device; and transmitting, by the first terminal device, to the second terminal device, the reference signal based at least partly on the resource configuration indicated in the third message.