better handling of atom types