cmd serialization