corrections to index.js