change index.js
Refactoring