water bucket using js