hopefully debugged web.js