cleaned up code for the report