modified utility for delete function