rev_index.messages = [k for k,v in sorted(message_list.items(), key=lambda x: x[1])]