fixed up the tests, implemented message insert