Hey there! Some molecules can accommodate more than 8 valence electrons because they have expanded valence shells. These molecules are from periods 3 or higher because starting from n=3, atoms have d-orbitals that can accommodate for more that 9 valence electrons.