added test7 and fixed getEdge