added histogram directive, slimmed down statisticsBase, removed filtering