Patrilineal kinship had compelling power socially and culturally; local lineages became the building blocks of society. A person's success or failure depended, people believed, on guidance from a father, from which the family's success and prosperity also grew. The patrilineage kinship structure, that is, descent through the male line, was often translated as "clan" in earlier scholarship. By the Qing, the patrilineage had become the primary organizational device in society. This change began during the Song dynasty when the civil service examination became a means for gaining status versus nobility and inheritance of status. Elite families began to shift their marital practices, identity and loyalty. Instead of intermarrying within aristocratic elites of the same social status, they tended to form marital alliances with nearby families of the same or higher wealth, and established the local people's interests as first and foremost which helped to form intermarried townships. The Neo-Confucian ideology particular Cheng-Zhu thinking adopted by the Qing placed emphasis on patrilineal families and genealogy in society. The emperors exhorted families to compile genealogies in order to strengthen local society.