solved the bucket problem