Basic first algorihtms for stress and risk