some redone work in index.js