refactoring searcher for views