Add server mode funcationalty to server