Ah yes, I remember this well. I always wondered in highschool why they told me every atom has 8 valence electrons, when in another text it would say, the n=3 can hold 18 electrons. HOW THE F? It still confuses me to this day...sort of.
Electron configurations are a bit confusing, know this, don't believe that 8 valence electron bulls&$#. I have just spent 15 minutes trying to find a periodic table with electron configurations and have not found one after 30 google image searches
Once you see one you will understand. At times, the d orbital energy is so close to the next s orbital energy that d is filled before s. I"m trying to find you an example, but google sucks