sync for connection to server