The actual administrative work was done by a body of nobles – appointed officials outside the royal family. These nobles were graded into a number of ranks, the most common of which, in order of importance, were chaophraya, phraya, luang, and khun. The nobles of highest rank headed the previously mentioned departments in the government. The heads of six most important departments – the departments of the northern provinces, the southern provinces, the capital, lands, commerce and foreign relations, and the palace – formed a group known as the senabqdi, or chief ministers, which acted as a consultative council for the king.