broken code for the DNS weight recalculation