refactored motor.to