decoding of rs code