Change shard implementation to schema