put together serialization methods