closed for loop