refactor -> class Server