rebalance functionality complete