Modified index.js