speed optimization, dont replace the thread local variable on every access