deleting document works