second fix to index.js