use of router class to implement dynamic load balancer