change predicate to java8