added new modified functions so that quantiles() will not break when passed rates of NAs