undo deletion better, but still needs testing