add thread safe in singleton