Updated delete functionality to alert the user