updated connection script