add swap rebalance support
add swap rebalance testcases