added buf to web.js