Added the confidence interval calculations
Minor changes