Rewriting encoder/decoder
Rewriting encoder/decoder