Medreses were built in as part of a Mosque complex where many programmes, such as aid to the poor through soup kitchens, were held under the infrastructure of a mosque, which reveals the interconnectedness of religion and social life during this period