added some comments to index.js