add thread state change