From a literary and pedagogical point of view, Ānanda often functioned as a kind of foil in the texts, being an unenlightened disciple attending to an enlightened Buddha. Because the run-of the-mill person could identify with Ānanda, the Buddha could through Ānanda convey his teachings to the mass easily. Ānanda's character was in many ways a contradiction to that of the Buddha: being unenlightened and someone who made mistakes. At the same time, however, he was completely devoted to service to the Buddha. The Buddha is depicted in the early texts as both a father and a teacher to Ānanda, stern but compassionate. Ānanda was very fond of and attached to the Buddha, willing to give his life for him. He mourned the deaths of both the Buddha and Sāriputta, with whom he enjoyed a close friendship: in both cases Ānanda was very shocked. Ānanda's faith in the Buddha, however, constituted more of a faith in a person, especially the Buddha's person, as opposed to faith in the Buddha's teaching. This is a pattern which comes back in the accounts which lead to the offenses Ānanda was charged with during the First Council. Moreover, Ānanda's weaknesses described in the texts were that he was sometimes slow-witted and lacked mindfulness, which became noticeable because of his role as attendant to the Buddha: this involved minor matters like deportment, but also more important matters, such as ordaining a man with no future as a pupil, or disturbing the Buddha at the wrong time. For example, one time Mahākassapa chastised Ānanda in strong words, criticizing the fact that Ānanda was travelling with a large following of young monks who appeared untrained and who had built up a bad reputation. In another episode described in a Sarvāstivāda text, Ānanda is the only disciple who was willing to teach psychic powers to Devadatta, who later would use these in an attempt to destroy the Buddha. According to a Mahīśāsaka text, however, when Devadatta had turned against the Buddha, Ānanda was not persuaded by him, and voted against him in a formal meeting. Ānanda's late spiritual growth is much discussed in Buddhist texts, and the general conclusion is that Ānanda was slower than other disciples due to his worldly attachments and his attachment to the person of the Buddha, both of which were rooted in his mediating work between the Buddha and the lay communities.