refactoring dialogs, just beginning