Added predicate logic