histograms output hack

- histograms are outputted in file
- solution uses ugly hack
- to be undone in the future