<P> The center of the political power of the Tang was the capital city of Chang'an (modern Xi'an), where the emperor maintained his large palace quarters and entertained political emissaries with music, sports, acrobatic stunts, poetry, paintings, and dramatic theater performances . The capital was also filled with incredible amounts of riches and resources to spare . When the Chinese prefectural government officials traveled to the capital in the year 643 to give the annual report of the affairs in their districts, Emperor Taizong discovered that many had no proper quarters to rest in and were renting rooms with merchants . Therefore, Emperor Taizong ordered the government agencies in charge of municipal construction to build every visiting official his own private mansion in the capital . </P> <P> Students of Confucian studies were potential candidates for the imperial examinations, the graduates of which could be appointed as state bureaucrats in the local, provincial, and central government . There were two types of exams that were given, mingjing (' illuminating the classics examination') and jinshi (' presented scholar examination'). The mingjing was based upon the Confucian classics and tested the student's knowledge of a broad variety of texts . The jinshi tested a student's literary abilities in writing essay - style responses to questions on matters of governance and politics, as well as their skills in composing poetry . Candidates were also judged on their skills of deportment, appearance, speech, and level of skill in calligraphy, all of which were subjective criteria that allowed the already wealthy members of society to be chosen over ones of more modest means who were unable to be educated in rhetoric or fanciful writing skills . There was a disproportionate number of civil officials coming from aristocratic as opposed to non-aristocratic families . The exams were open to all male subjects whose fathers were not of the artisan or merchant classes, although having wealth or noble status was not a prerequisite in receiving a recommendation . In order to promote widespread Confucian education, the Tang government established state - run schools and issued standard versions of the Five Classics with selected commentaries . </P> <P> This competitive procedure was designed to draw the best talent into government . But perhaps an even greater consideration for the Tang rulers, aware that imperial dependence on powerful aristocratic families and warlords would have destabilizing consequences, was to create a body of career officials having no autonomous territorial or functional power base . The Tang law code ensured equal division of inherited property amongst legitimate heirs, allowing a bit of social mobility and preventing the families of powerful court officials from becoming landed nobility through primogeniture . As it turned out, these scholar - officials acquired status in their local communities and in family ties, while they also shared values that connected them to the imperial court . From Tang times until the end of the Qing dynasty in 1912, scholar - officials functioned often as intermediaries between the grassroots level and the government . Yet the potential of a widespread examination system was not fully realized until the Song dynasty, when the merit - driven scholar official largely shed his aristocratic habits and defined his social status through the examination system . As historian Patricia Ebrey states of the Song period scholar - officials: </P> <P> The examination system, used only on a small scale in Sui and Tang times, played a central role in the fashioning of this new elite . The early Song emperors, concerned above all to avoid domination of the government by military men, greatly expanded the civil service examination system and the government school system . </P>

When did the tang dynasty reach its peak