updated sendCmd