Changed encoding
Added deserialization