Add thread class and two inherited classes