cleaned server.cpp