536 BC and 504 BC – the first on cauldrons and the second on bamboo. Additionally, other notable codes include the codes of Wei, drafted by Li Kui. Such codification was part of the process by which rulers attempted to make the central administration of the state more effective. However, they attracted criticism from orthodox statesmen, including Confucius, on the basis that they eroded the distinction between the "noble" and the "base." The Five Punishments dated from this time. Legalism and Qin In 221 BC, the state of Qin finally obtained supremacy over its rivals and thus the Qin dynasty was founded. One of the reasons for its success was the adoption, on the advice of Lord Shang Yang, of far-reaching penal and administrative codes in the 4th century BC. The laws imposed severe punishments for failure to comply with duties imposed by the state and on the whole punished all alike. During this stage, law was marked by a purely Legalist spirit, hostile to the moral values advocated by the Confucian school of thought. The Legalist school, as represented by such thinkers as Han Fei Zi, insisted that the ruler must always rely on penal law and the imposition of heavy punishments as the main instrument of the government. At the same time, moral considerations and social standing should be rigorously excluded. Another hallmark of Legalist thinking was that equality should be before the law. On the question of legislative technique, the Legalists stressed that the rules enacted by the ruler for punishment of offences should be clear and intelligible to the ordinary people, and they should be properly communicated to the populace. Multiple corporal punishments were implemented by the Qin, such as death by boiling, chariots, beating, and permanent mutilation in the form of tattooing and castration. People who committed crimes were also sentenced to hard labor for the state. Legalism survived in a diluted form after the Han dynasty succeeded the Qin. It was recognised that there was a need for complex penal and administrative codes that enabled the emperor to govern the country through a hierarchy of ministers and officials, all ultimately responsible to him. Imperial legal systems all retained the original Legalist insistence that the powers of officials be defined in detail and that punishments be prescribed for transgressions, whether inadvertent or not. Han lawmakers took account of Confucian values and introduced rules designed to