modified the shard management