handle Text to protobuf serialization