Add 3 ways to make class thread safe