start working on sendMessage function