Added SendMessage function