save an iterator by using index loop?