adds send message functionality