Inserted the method to view graph