factored report generation to helper file