added the Memento behavioural pattern