refactoring dependency structure