readgraph method and edge-class updated