switched a variable to make code easier to read