dialog's functions has been finished