When an electron in an atom absorbs energy, it