major refactoring in object recognition