small changes to histogram data handling