David divided them into groups corresponding to the sons of Levi: Gershon, Kohath, and Merari. 