automatic partitioning