This is the code using rank as the metric. Forwarding packets are being checked. Load balancing is there but it is not optimal