Continued work on atomicity, it works but it's not very efficient