more logic to load dialogs