having problem on threads