refactor report controller