Complete addEdge function in assign.js