Lewis considered the "group of two" to be of greatest importance for understanding molecules and chemistry. However, he had also described the "group of eight", which just said that many atoms gain, lose or share electrons until they have eight valence electrons (as we saw in the previous page). But he later said that the "group of eight" was less fundamental than the "group of two". This may be in part because Langmuir invented the term "octet" to replace "group of eight" and tried to force many compounds to fit it, even if they didn't seem to. Lewis recognized that not all stable compounds follow the octet rule. Although it usually works pretty well for elements in the p-block, the transition metals usually follow the "18-electron rule". You can see that the rule matches the periodic table: hydrogen and helium want 2 electrons, p-block elements want 8, d-block elements 18, etc.
The essence of Lewis' theory is that stable compounds can be predicted and understood using what are now called "Lewis dot structures". These show the arrangement of valence electrons in a molecule. For stable molecules, it is usually possible to draw a structure in which electrons are shared so that every atom has its octet (8 electrons), either by adding, losing, or sharing electrons.