accounted for new variables, made slope finding more robust to NAs
added footnote and ref