refactored cdf method from binomial dist