tried to get the undo button working