retooling to use iterators and not repeat data