Move these before the for loop below where they get used.