another rework of the autopartitioner