 Therefore, although Emperor Wenxuan, particularly late in his reign, turned violent and wasteful, the imperial government nevertheless functioned effectively.Yang was praised for remembering those who had helped him in the past, repaying them greatly, but not bearing grudges against those who had tried to hurt him.With Emperor Wenxuan, in his late years, accustomed to killing people for entertainment while he was drunk, Yang thought of an unusual solution—he sent a supply of condemned prisoners to the palace, to be killed whenever Emperor Wenxuan wanted to kill someone; if the prisoners could survive three months without being killed, they would be freed.