Added scaleForMotor() function