Recode threads