search now uses predicate properly