First version of the Partition phase