Added iterate function