I wasn't suggesting to reuse `delete` but rather to export what's common here and in `delete` to another function... that you'll be able to call here directly.