made some changes to client and server