calculate risk