modified parsing a graph
modified edge constructor to be private and added copyEdge to edgefactory