fixing refactoring error with variable name