refactoring the delete route
one liner too long