references refactoring