added var buf to web.hs