refactoring exporting, added tests for object recognition