improvements to iteration