update code for the dialog