moving thread_safe helper to global space for names