until the for loop finishes