updated web.js and index.html as per big diagram