change quantile algorithm