some refactoring of history class