initial code to send messages