updateserver function added