cleanup
added a send message function