There was an elaborate gradation and hierarchy among the middle-ranking and even untouchable castes, which governed interaction between them and kept inter-caste socialization to a minimum. Historically, the rich in each low caste emulated the customs and rituals of the upper castes, such as child marriage, the payment of dowries, and prevention of widows remarrying.