Write some trns/rcv code