thus it was that by the end of the council , the entirety of both the vinaya and the dhamma lived within the memory of not only upali and ananda , but of the council as well , and would from there on be passed down , monk to monk for over five hundred years before the dhamma and vinaya were finally committed to written pali .