further improve performance by adding Atomic