switch around a few variable names for clarity