serialization of common types