added popup_window function