factoring out report.sh