making connectedthread