adopting <NSLocking> protocol