Added iteration functionality