refine ThreadWork