designing Predicate subclass