modified utility for delete function

modified utility for delete function