now using the connect to server method