Under the Tang law code compiled in the 7th century, severe punishments were outlined for those who disobeyed or disrespected the hierarchical system of elders. Those who assaulted their parents could be put to death, those who assaulted an older brother could be put to forced labor, and those who assaulted an older cousin could be sentenced to caning. A household servant who killed his master could be sentenced to death, while a master who killed his servant would be arrested and forced into a year of hard labor for the state. Yet this reverence for elders and superiors was grounded in more than just secular Confucian discourse; Chinese beliefs of ancestor worship transformed the identity of one's parents into abstract, otherworldly figures. Song society was also built on social relationships governed not by abstract principles, but on the protection gained by devoting oneself to a superior.