break setUpGraphs function into parts