improved rebalance routines