refactoring while introducing memento
refactored memento