working motor.c