implemented message ordering