moving report generation to top level