separated serializer/deserializer classes (refactoring)