The role of soils in the regulation of hazards and extreme events