converting messages to new formatting system