updated script.js and index.html