Added new code for partitioner.