making it better
added multiplication of histograms