Lower-grade officials on the county and prefectural levels performed the necessary duties of administration such as collecting taxes, overseeing criminal cases, implementing efforts to fight famine and natural calamity, and occasionally supervising market affairs or public works. Since the growth of China's population far outmatched the total number of officials accepted as administrators in the Song government, educated gentry who had not been appointed to an official post were entrusted as supervisors of affairs in rural communities. It was the "upper gentry" of high-grade officials in the capital—comprising mostly those who passed the palace exams—who were in a position to influence and reform society.