getRandomCell takes predicate