add iteration counter