proper generating of the dependency graph