Amended index.js