some function
implement addEdges func
pass a test case