more work on serialization