adapted graph_funcs for 'for' loops, improved code_graph