refactored exclusion of search