write a function helper (a lambda ?) for the predicate, it will be easier to read