Move setting the first outside the inner for loop for slight efficiency