Encode method
Decode method