defactoring dependency handler