update web.js for assignment 1.7