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