water bucket in js