got rid of error in addEdge