add predicate pattern example