changed order of arguments to addEdge