Added code for plotting of histograms