add serialization/deserialization logic