creating perm thread class