Merging histograms