finished translation of itertools