Added send command function (not tested)