Using predicate to handle search term