The reforms of Shang Yang were the two great waves of restructuring carried out in Qin between 356 and 338 BC — the most thorough of all the Warring States reforms. In 359 BC he offered Duke Xiao of Qin his 'art of strengthening the state', and in 356 BC came the first reform: households registered in mutual-responsibility groups of five and ten, with collective punishment; farming and war rewarded — weavers and growers of surplus grain exempted from labor, heads taken in battle exchangeable for rank; and no member of the royal clan without military merit to keep his hereditary privileges. In 350 BC came the second: the well-field boundaries abolished and the paths opened, private land recognized; the county system installed, with magistrates and vice-magistrates appointed and dismissed by the ruler directly — hereditary office giving way to bureaucracy; the capital moved to Xianyang, and weights and measures unified. When the heir broke the law, his tutor was punished and his other tutor branded — 'the law fails when those above break it'. Ten years on, 'the people of Qin were content, nothing lost on the roads, no bandits in the hills, every household ample' — the weak state of the western edge now the strongest of the age. In 338 BC Duke Xiao died; Shang Yang, accused of treason, died by his own law in a defeated rising, torn apart by chariots — yet 'Shang Jun perished, Qin's law did not': the institutional base of Qin's conquest of the six states was laid here.