added simple undo/redo mechanism for double linked list