how does the physical layer work