a predicate function would be useful too