updated to foundation atomics refactor