added send message function and updated docs