modified buffer in web.js