remove the global variable to make the class thread safe