refactor function deleteDialog
add function simpleDialog