fixed confidence upper bound being NaN.  Related to being dumb and making two functions to do the same thing :(.