added download fn and report generation