refactor reports controller