rename variables and reorder them to add clarity