for loop needed closing