###Answer the question from the input provided. Please answer from input only.

###Input: The Yuan dynasty was the first time that non-native Chinese people ruled all of China. In the historiography of Mongolia, it is generally considered to be the continuation of the Mongol Empire. Mongols are widely known to worship the Eternal Heaven, and according to the traditional Mongolian ideology Yuan is considered to be "the beginning of an infinite number of beings, the foundation of peace and happiness, state power, the dream of many peoples, besides it there is nothing great or precious." In traditional historiography of China, on the other hand, the Yuan dynasty is usually considered to be the legitimate dynasty between the Song dynasty and the Ming dynasty. Note, however, Yuan dynasty is traditionally often extended to cover the Mongol Empire before Kublai Khan's formal establishment of the Yuan in 1271, partly because Kublai had his grandfather Genghis Khan placed on the official record as the founder of the dynasty or Taizu (Chinese: 太祖). Despite the traditional historiography as well as the official views (including the government of the Ming dynasty which overthrew the Yuan dynasty), there also exist Chinese people[who?] who did not consider the Yuan dynasty as a legitimate dynasty of China, but rather as a period of foreign domination. The latter believe that Han Chinese were treated as second-class citizens,[citation needed] and that China stagnated economically and scientifically.

The system of bureaucracy created by Kublai Khan reflected various cultures in the empire, including that of the Han Chinese, Khitans, Jurchens, Mongols, and Tibetan Buddhists. While the official terminology of the institutions may indicate the government structure was almost purely that of native Chinese dynasties, the Yuan bureaucracy actually consisted of a mix of elements from different cultures. The Chinese-style elements of the bureaucracy mainly came from the native Tang, Song, as well as Khitan Liao and Jurchen Jin dynasties. Chinese advisers such as Liu Bingzhong and Yao Shu gave strong influence to Kublai's early court, and the central government administration was established within the first decade of Kublai's reign. This government adopted the traditional Chinese tripartite division of authority among civil, military, and censorial offices, including the Central Secretariat (Zhongshu Sheng) to manage civil affairs, the Privy Council (Chinese: 樞密院) to manage military affairs, and the Censorate to conduct internal surveillance and inspection. The actual functions of both central and local government institutions, however, showed a major overlap between the civil and military jurisdictions, due to the Mongol traditional reliance on military institutions and offices as the core of governance. Nevertheless, such a civilian bureaucracy, with the Central Secretariat as the top institution that was (directly or indirectly) responsible for most other governmental agencies (such as the traditional Chinese-style Six Ministries), was created in China. At various times another central government institution called the Department of State Affairs (Shangshu Sheng) that mainly dealt with finance was established (such as during the reign of Külüg Khan or Emperor Wuzong), but was usually abandoned shortly afterwards.

While the existence of these central government departments and the Six Ministries (which had been introduced since the Sui and Tang dynasties) gave a Sinicized image in the Yuan administration, the actual functions of these ministries also reflected how Mongolian priorities and policies reshaped and redirected those institutions. For example, the authority of the Yuan legal system, the Ministry of Justice, did not extend to legal cases involving Mongols and Semuren, who had separate courts of justice. Cases involving members of more than one ethnic group were decided by a mixed board consisting of Chinese and Mongols. Another example was the insignificance of the Ministry of War compared with native Chinese dynasties, as the real military authority in Yuan times resided in the Privy Council.

Since its invention in 1269, the 'Phags-pa script, a unified script for spelling Mongolian, Tibetan, and Chinese languages, was preserved in the court until the end of the dynasty. Most of the Emperors could not master written Chinese, but they could generally converse well in the language. The Mongol custom of long standing quda/marriage alliance with Mongol clans, the Onggirat, and the Ikeres, kept the imperial blood purely Mongol until the reign of Tugh Temur, whose mother was a Tangut concubine. The Mongol Emperors had built large palaces and pavilions, but some still continued to live as nomads at times. Nevertheless, a few other Yuan emperors actively sponsored cultural activities; an example is Tugh Temur (Emperor Wenzong), who wrote poetry, painted, read Chinese classical texts, and ordered the compilation of books.

The average Mongol garrison family of the Yuan dynasty seems to have lived a life of decaying rural leisure, with income from the harvests of their Chinese tenants eaten up by costs of equipping and dispatching men for their tours of duty. The Mongols practiced debt slavery, and by 1290 in all parts of the Mongol Empire commoners were selling their children into slavery. Seeing this as damaging to the Mongol nation, Kublai in 1291 forbade the sale abroad of Mongols. Kublai wished to persuade the Chinese that he was becoming increasingly sinicized while maintaining his Mongolian credentials with his own people. He set up a civilian administration to rule, built a capital within China, supported Chinese religions and culture, and devised suitable economic and political institutions for the court. But at the same time he never abandoned his Mongolian heritage.



###Question: Who had military control during the Yuan?

###Answer: {'answer':'the Privy Council'}