made getter thread-safe