Use reduce to generate report instead of forEach