make ranges work for all sharding strategies