fixed a bug where the nested for loop wouldn't be recognized without brackets