implement Server and server.cpp