refinements to serialization