Updated loops and iterations.