implement percentile cache