implements report generation as a background job