add a segentation iterator
better segementation generation