separate out merge_reports function