refactoring dependency