added JSON output to histogram.