modify LoadBalancerImpl class and add tests for it.