His constant frustrations and resentment, however, stimulated an active period of literary output. Many of his best works were written during this period. During his time in Baghdad, he used the opportunity to carry out research for his grand history, later published as Künhü'l-aḫbār (English: The Essence of History).[3]