do the serialization