prepare partitioning