Update index.js

stupid api chaning