added cumulative distribution function