added name generator to the serialization.