simulation precedure changes

add the code for generating confidence intervals