Renamed sendcmd function.