refactor report module