Modified index.js and have bugs.