Bucket: New field `hook` for customization

(Applied to pass a function for each bucket)