updated web.js based on HW3