dependency refactoring