added risk calculation