merge statistic_save and report function