The late eighteenth-century shortage of cadavers for legitimate medical research and dissection posed a problem for scientists and students, some of whom were in fact reduced to bodysnatching. It did not go unnoticed by the public, which looked on such research with revulsion. In the most heated expression of disdain, New Yorkers rioted for three days in April 1788 upon discovering that bodies had been stolen from a graveyard. Children peered through windows of the Society of the Hospital of the City of New York and discovered the medical students dissecting human cadavers. The children's parents investigated, and one discovered that his late wife's grave had been robbed. A mob, five thousand strong, stormed the hospital (and later the jail where several doctors took refuge), leading to a three-day riot which the militia dispersed only by firing muskets into the crowd. In 1789, New York passed a law making it possible for doctors to obtain cadavers without resorting to body-snatching. A similar bill was passed in London only in 1832; until then, sometimes even grave-robbing did not satisfy the need for cadavers. In 1829, William Burke was hanged in Edinburgh for murdering victims by asphyxiation in order to provide cadavers to physicians.