adding functionality to send messages