updated web.js with buffer