finished code for binomial, still need clean up and comment