polling and formatting for message system