motor initialization