added basic rebalance mechanism; added rebalance to manage ui