Update index.js

solving the problem of #13