revise client and server