fixed error in index.js