updated web.js

should work more effeciently