messing with some itertools functions