tuple serialization