serialization in place