refactor dependency graph model