update predicate example and add iterator example