added handler for sending chat messages