updates script with connection