simplified index.js