added 1st version of index.js