slightly better serialize/deserialization.