cleanup iterator interface (little refactoring)