update graph, create path