refactor the dependency