working on undo bug