modified driver to print in graph format