modify the server init function