removed static thread_counter