updated the atom_bag calculations