document deleting reimplemented