Added code to make the histograms