missing bracket in for loop