minor thread table logic refactory