Started working on Encode and Decode methods