found bug in atom class. Prog fixed