change from dialog to popup