Implemented memento pattern