renamed setDialogResult to closeDialog