refactor reporter code.