added function to generate graphviz output