update main.js with indexes