#21 Remove dependency of itertools module