Added shard factor parameter.