itertools is much faster