fixed parallelize partition calculation