changed web.js according to lecture sample