start of the motor controller class