added memento design pattern