Histogram refactoring: v1
histogram v1.5