First complete commit

Complete the function to send messages