We defined the variables outside the loop so they don't have to be re-allocated on the stack or redefined in the scope for each cycle of the loop.