add server hostname lookup and connect to server