added functionality to post a new message