write about working of motor