modes and atoms to enumerations