undo deletion now working, but it could get messy