finish main.js and index.html