fixed percentile algorithm