trying to make depgraph more efficient