Finished advanced iteration functionality