added comments to index.js