Revert "Revert "simplify the method delete""

This reverts commit 20649a998f78e90eb7bd628a093814520a4f77c2.