use universal predicate instead of separate class object