working version of loadbalancing