converted tx phy layer to functions