move dialog from the model to the view