changed var types, added constraint on motorT