added server connection stuff