updates to thread example