iterator in algo7