first template iteration