Refactoring marks' histogram.