add the singleton pattern, this is thread safe also