Added iteration counter