add thread class