modified thread example