Cui Hao
In 424, Kou took these texts with him to the Wei court. There, he was welcomed by Emperor Taiwu and garnered the support of Cui Hao, the prime minister. Even though Cui Hao was a Confucianist, he greatly admired Kou and was immediately drawn to him. Cui also appreciated Kou's mathematical skills and hoped that he might help him improve his own longevity techniques. They also shared a dream of a 'purified society,' a land where peace and justice prevailed. Kou's 'New Code' was promulgated throughout the realm, and a large altar was built near the capital where 120 Daoist practitioners performed rites and prayers daily. Cui gained a great deal of power in the court, and in 444 began to purge the Buddhist clergy. This led to a major persecution against Buddhists in 446. In 448, Kou Qianzhi was 'released' from his body, and Cui lost his greatest supporter at the court. Shortly after Kou's death, Cui had a national history of Wei dynasty containing unflattering portraits of its rulers carved in stone. This so enraged the emperor, that he had Cui executed in 450. After Cui's execution, the Daoist community was forced to flee, with many of them settling at the Daoist center of Louguan.