made thread safe (no thread local with thread pools possible)