Code to implement reliable two way transmission