add delete button pressed functionality