changes in motor.c