added some tests, aggregate predicate