add double-checked locking implementation for singleton pattern