Finished binomial function