adding thread local examples code