In the study of the history of torture, some authorities rigidly divide the history of torture "per se" from the history of capital punishment, while noting that most forms of capital punishment are extremely painful. Torture grew into an ornate discipline, where calibrated violence served two functions: to investigate and produce confessions and to attack the body as a form of punishment. Entire populaces of towns would show up to witness an execution by torture in the public square. Those who had been "spared" torture were commonly locked barefooted into the stocks, where children took delight in rubbing feces into their hair and mouths.