to encode