graphGenerator correctly takes in nodes from the list, working on parsing list of edges