refactoring history view in history controller