improve the interface of itertools