Trying to break down the for loops to use constant values over variables