added a test for using a predicate