revert modal
refactoring modal dialog