adding undo and restart support