added undo architecture