possibly adapting the Sannyasa Upanishads with their Advaita leaning. Mathas, as simple huts for wandering ascetics, are mentioned in chapter 12.139 of the Mahabharata and section 3.1 of Baudhayana Dharmasutras. Matha-s were regionally known by other terms, such as Ghatika-s and Khandika-s. The oldest verifiable Ghatika for Vedic studies, from inscription evidence is in Kanchi, from the 4th-century CE. Historical roles of matha The matha tradition of Hinduism attracted royal patronage, attracting endowments to support studies, and these endowments established, states Hartmut Scharfe, what may be "the earliest case on record of a university scholarship". Some of these medieval era mathas of Hinduism in Andhra Pradesh, Karnataka, Kerala and Tamil Nadu, were for Vedanta studies, but some mathas from the 700 to 1000 CE period predominantly focussed on Shaivism, Vaishnavism, military, martial arts, music, painting or other fields of knowledge including subjects related to Buddhism and Jainism. There is evidence, states Hartmut Scharfe, of mathas in eastern and northern India from 7th century CE onwards, such as those in Kashmir, Uttar Pradesh particularly in the Hindu holy city of Kashi, Madhya Pradesh, Bihar and Odisha, but these are not from ancient temple inscriptions, but implied from traveller records (Chinese) who visited these regions. Brahmins were likely involved in the education and oral culture of textual transmission in ancient India through the gurukul tradition, but inscription evidence collected by E. Hultzsch suggests that at least some matha attached to temples were dominated by non-Brahmins by the early 2nd millennium CE. The mathas and attached temples routinely hosted debating, Vedic recital and student competitions, and these were part of community festivals in the history of South Asia. These mathas were also the centers where many new texts were composed, as well as the libraries and repository of ancient and medieval manuscripts, where the old texts were preserved and decaying copies replaced over the centuries. The Thiruvavaduthurai Adhinam – a Shaiva matha about twenty kilometers northeast of Kumbhakonam, for example, was a major source of preserved palm-leaf manuscripts of ancient Tamil literature for the colonial era scholars trying to rediscover historic Indian literature. The four major Advaita mathas state in their founding documents that the respective responsibility of the mathas was to preserve one Veda each. Some Hindu monasteries offered hospice care for pilgrims and various forms of assistance to their local communities. Hindu mathas and temples – like Buddhist monasteries – had