partition

refactored