added code to send message