add function to add a single vertex; clean up code in AddGraphEdge