Add simple group rebalancing code