updated server.cpp and client.cpp