added a readGraph function to clean up main. Need to write a loop to iterate through multiple files in graph.