correctly renaming a variable