added per thread singleton to support threaded graph