introduced EncodedMotor class