tighten up report.py code a little bit