update the thread