Update index.js

solving the problem of #13
Merge pull request #16 from platdesign/patch-1

Update index.js