added motor speed setting stuff