add user serialization and deserialization functions