complete implementation of dialogs