since the days that he was crown prince, he had Anchi execute Qiudun and take over his position. For the time being, Emperor Taiwu left Helian Ding alone, while preparing an assault on Rouran instead, since Rouran had been harassing the northern border region. In light of the Xia campaign, the historian Sima Guang wrote this commentary about Emperor Taiwu, in his Zizhi Tongjian: In 429, with only Cui Hao in support and most other officials opposing, Emperor Taiwu launched a major attack on Rouran. (The officials who opposed largely worried that Emperor Wen of Liu Song, who had for years wanted to regain the provinces south of the Yellow River that Emperor Mingyuan captured in 422 and 423, would attack.) Emperor Taiwu pointed out that even if Liu Song could attack, it became even more crucial to defeat Rouran first, lest that Rouran attacked at the same time that Liu Song did. He surprised Yujiulü Datan, whose people scattered, forcing him to flee. However, as he chased Yujiulü Datan, he himself became hesitant to advance further, and he withdrew. Only later did he hear that he was in fact very close to Yujiulü Datan's position and could have captured the Rouran khan had he chased further, and he regretted his withdrawal. On the way back, he also attacked Gaoche tribes, and along with the Rouran tribes that he captured, he resettled them south of the Gobi Desert and had them exercise agriculture. From this point on, Northern Wei's northern provinces became rich and no longer lacked livestock and leather. He greatly rewarded Cui, and from this point Cui's advice became what he accepted at all times. In spring 430, Liu Song launched a major attack, and Emperor Taiwu, judging his own defenses south of the Yellow River to be unable to withstand a Liu Song attack, withdrew them north, judging correctly that Liu Song forces would stop at the Yellow River, planning to counterattack in the winter after the river froze. Meanwhile, hearing that Liu Song and Xia had subsequently entered into a treaty to attack him and divide Northern Wei lands, he judged correctly that despite the treaty Liu Song had no intention to cross the Yellow River north, and he decided to destroy Xia once and for all. In fall 430, he made a surprise attack on the new Xia capital Pingliang (平涼, also in modern Pingliang),