got a rebalance algorithm working
dialyzer found dead code