manual serialization of physics