atom refactored