added function to display dialogs