adding reporting logic and test