minimized iterators code