some work on sorting the messages based on block height