combined tx and rx into single class