Reordered functions in server.cc