balance the partitions