calculate correct shard