Declare variables outside of for loop