changed encoder, decoder
Merge pull request #7 from yzernik/encode_decode

changed encoder, decoder