updated connect to use correct syntax