Added get_risk function to extract risk information