refactored modal for global operation