Code added to MotorController