Added separate functions for Rx and Tx