adding report_detail function