use AtomicBoolean / AtomicReference