Created experimental undo function (no UI)