index.js implementation