add graph for precomputed edges