created a predicate to lambda boolean expression