started work on message sorting