Changed motor test code