added replicationFactor to assignShards()