update for delete functionality