update index.js and script.js