Now the dialog passes the values to the constructor