Updated partition procedure.