added motor control