Modified RX/TX code