code change to batch partitioner