combine main with popup