add region.js, move index js to main.js