Refactored to comply with the new Atomic API