changed popup flow