wrote simple serialization framework