implement namespace serialization