refactoring for quarterly view