implemented more efficient function for computing the binomial
coefficient.