switch of ser and client