refactor buckets to partial