A framework for preventing and managing risks in confined spaces through IOT technologies