format client messages to classify their type