some simplifications in serialization