update index and index.js