move HistMerger to separate file. This will become more flexible