Connecting the threads