optimizing bucket.size