add encoding, decoding