reference implementations of dynamic histograms paper