more changes to index.js