Replaced "var" in for loops