rename variables so they don't shadow each other