Added Predicate and tests