Declaring variables outside of a for loop