add sorting, skipping, and direction to messages display