refactor Python script for generating report (add stats for CU + global stats)