rewrite empty check in main.js
add modal in index.html and call this in main.js