refactoring Atom.py