add the code for tx only and rx only