persistand undo finally working!