added function to send the message