functions were performed by magistrates rather than by separate persons. The emperor delegated many of his administrative and judicial powers to his officials while reserving for himself the legislative function. Official law may itself be divided into two main components: penal law and administrative law. The former prescribed punishments for certain behaviour, and the latter defined the duties of the officials. By contrast, "unofficial" law was the customary law of the people, rules that developed in localities or in merchant guilds for the handling of matters of common concern. Neither of the standard words for law – fa (法) or lü (律) – was ever applied to rules of this kind. Of these varieties only penal law has been systematically studied by Western scholars. The complexity of the Chinese administrative system has made it difficult for Western students to acquire a general familiarity with the legal principles that govern it. The study of unofficial law has also been limited due in part to the fact that the data are contained in such a variety of source materials, most extremely difficult to access. The lack of access to source material gave earlier scholars, both Chinese and Western, the mistaken impression that Imperial China did not have a system of civil law. Penal law The centrepiece of the penal law is the "code of punishments" issued by each dynasty at its inception. Although fragments of laws survive from the Qin and Han, the first surviving complete code was the Kaihuang Code developed during the Sui dynasty and adopted by later dynasties including the Tang in 653. This code provided the model for all the later traditional penal codes through its definition of the Five Punishments and Ten Abominations. Only the Mongol Yuan dynasty failed to issue a penal code, but the collections of legal materials from that dynasty still show the strong influence of the Tang code. The penal codes contain only rules that prescribe punishments for specific offences, rules that define generally the allocation of punishment, or those that establish principles of interpretation. Each offence was allocated a specific punishment. The task of the magistrate was to identify the proper name of the offence disclosed by the facts. Determination of the correct punishment automatically followed. The penal code was seen as indispensable part of government rules, yet punishments were still to be humane. The mutilating punishments that had characterised earlier law