refactoring
ZigZagIterator - not tested