small refactoring of reporting logic