A method performed by a user equipment, UE, for using subframes of a radio access network for a Device-to-Device, D2D, communication, the method comprising: - determining subframes available for D2D communication among subframes of the radio access network, wherein the subframes available for D2D communication exclude a number of subframes of the radio access network, such that a periodicity of the D2D communication in number of subframes divides the number of subframes available for D2D communication, wherein determining the subframes available for D2D communication is characterized in comprising: • determining a subset of the subframes of the radio access network by excluding subframes that are for transmission of sidelink synchronization signals, SLSS, • determining the subframes available for D2D communication by excluding further subframes from the determined subset when needed to make the number of determined subframes available for D2D communication divisible by the periodicity of the D2D communication, wherein the excluded further subframes are interleaved with the subframes available for D2D communication, • indexing the determined subframes available for D2D communication, • dividing the determined subframes available for D2D communication into periods according to the periodicity of the D2D communication, - using the determined subframes for enabling D2D communication. - determining subframes available for D2D communication among subframes of the radio access network, wherein the subframes available for D2D communication exclude a number of subframes of the radio access network, such that a periodicity of the D2D communication in number of subframes divides the number of subframes available for D2D communication, wherein determining the subframes available for D2D communication is characterized in comprising: • determining a subset of the subframes of the radio access network by excluding subframes that are for transmission of sidelink synchronization signals, SLSS, • determining the subframes available for D2D communication by excluding further subframes from the determined subset when needed to make the number of determined subframes available for D2D communication divisible by the periodicity of the D2D communication, wherein the excluded further subframes are interleaved with the subframes available for D2D communication, • indexing the determined subframes available for D2D communication, • dividing the determined subframes available for D2D communication into periods according to the periodicity of the D2D communication, • determining a subset of the subframes of the radio access network by excluding subframes that are for transmission of sidelink synchronization signals, SLSS, • determining the subframes available for D2D communication by excluding further subframes from the determined subset when needed to make the number of determined subframes available for D2D communication divisible by the periodicity of the D2D communication, wherein the excluded further subframes are interleaved with the subframes available for D2D communication, • indexing the determined subframes available for D2D communication, • dividing the determined subframes available for D2D communication into periods according to the periodicity of the D2D communication, - using the determined subframes for enabling D2D communication.