User bucketing code