Variable assignment refactoring