gotr_encode() and half of gotr_decode() done