refactor change testAndSet to CompareAndSwap