notes on thread safety