Ujjain remained as an important city of the Guptas during the 4th and the 5th centuries. Kalidasa, the great Indian classical poet of the 5th century who lived in the times of the Gupta king Vikramaditya wrote his epic work "Meghadūta" in which he describes the richness of Ujjain and its people. In the 6th century CE the Chinese pilgrim Xuanzang visited India. He describes the ruler of Avanti as a king who was generous to the poor and presented them with gifts.