change message type from string to text