made slight changes in throttleToMotor function