predicate function design