refactored predicate