refactored into single view, sql_reports in progress