refactoring on popup
refactoring on popup