move out report generation into separate file