implemented callbacks from Dialogs