Everything but confidence interval is in working order. Todo check validity and confirm