added thread sample