Book of Deuteronomy have given various answers to the problem. The Deuteronomistic history theory is currently the most popular (Deuteronomy was originally just the law code and covenant, written to cement the religious reforms of Josiah, and later expanded to stand as the introduction to the full history); but there is an older theory which sees Deuteronomy as belonging to Numbers, and Joshua as a sort of supplement to it. This idea still has supporters, but the mainstream understanding is that Deuteronomy, after becoming the introduction to the history, was later detached from it and included with Genesis-Exodus-Leviticus-Numbers because it already had Moses
Leviticus Rabbah Leviticus Rabbah Leviticus Rabbah, Vayikrah Rabbah, or Wayiqra Rabbah is a homiletic midrash to the Biblical book of Leviticus ("Vayikrah" in Hebrew). It is referred to by Nathan ben Jehiel (c. 1035–1106) in his "Aruk" as well as by Rashi (1040–1105) in his commentaries on Genesis 46:26, Exodus 32:5, Leviticus 9:24, and elsewhere. According to Leopold Zunz, Hai Gaon (939-1038) and Nissim knew and made use of it. Zunz dates it to the middle of the 7th century, but "The Encyclopaedia Judaica" and Jacob Neusner date it to the 5th century. It originated in the Land of Israel, and is