add debug mode to graph