Dōgen spent the remainder of his life teaching and writing at Eihei-ji. In 1247, the newly installed shōgun's regent, Hōjō Tokiyori, invited Dōgen to come to Kamakura to teach him. Dōgen made the rather long journey east to provide the shōgun with lay ordination, and then returned to Eihei-ji in 1248. In the autumn of 1252, Dōgen fell ill, and soon showed no signs of recovering. He presented his robes to his main apprentice, Koun Ejō (孤雲懐弉), making him the abbot of Eihei-ji.