rebalance.m prettier