update addEdge()