qnli question: What was the name of the new commander Kanmu appointed in the year 797? sentence: By 801 the shogun had defeated the Emishi and had extended the imperial domains to the eastern end of Honshū.