more work on server.cpp