revert dialog refactoring