delete/save function + custom alert