The variable should be defined before the for loop like it was