refactoring changing variable/methods names and IoC