Implemented addEdge()