removed thread local usage