update to index.js