update buckets before shifting rows