Using `var` in a loop isn't proper style. Move the declarations outside the loop.