Update index.js

Changed method names