Bucket implementation
Fixes function creation