progress in code until first for loop