bug fix + enhanced modularity of reporting