refactor delete modal dialog