added client server func