added calibration of histograms