Under Emperor Yao, Shun was appointed successively Minister of Instruction, General Regulator and chief of the Four Peaks, and put all affairs in proper order within three years. Yao was so impressed that he appointed Shun as his successor to the throne. Shun wished to decline in favour of someone more virtuous, but eventually assumed Yao's duties. It was said that "those who had to try a lawsuit did not go to Danzhu, but to Shun." Danzhu was the son of Yao.