Missed a bracket
Modified for loop