Rework
- update auto_partition
- needs testing