refactored getting report