updated index and main.js