In turn, Marquess Wen defeated the State of Zhongshan while General Wu Qi attacked and took five cities in what would become Xihe Commandery () within the borders of the State of Qin (between the Yellow River and Luo River spanning parts of modern-day Shaanxi and Shanxi Provinces). With Ximen Bao installed as magistrate of Ye (in modern-day Hebei Province), Běimén Kě () in control of Suanzao () and Zhai Huang () as Senior Minister, Wei underwent political reforms and constructed irrigation systems. As a result, Wei became a powerful country during the early Warring States Period.