adapting to server