add thread sample