modufied index.js