added graphs and plot code