added comment about making variables "thread-safe"