abstracted odds ratios and relative risk functions. added chi2
reordered functions, minor bug fixes