tuning the rebalance loop