functional gui and triggering of the dialog box