working code for RTA outputs except FDD