added documentation for index.js