method definition for renderGraphs