added thread watching