working version. Not lock-free
working version. Not lock-free