Added a function to nicely print out graphs