removed from-node in edge class as that was redundant
modified graph data structure to include an array.