reduced the number of times the report query is called from two to one