some code refactoring
random report feature