make quantile threshold an input option