Implement new confidence interval code