updates index.js and test.js. Tests passing