* small refactor in dialog