serialization of input