use interpolation for more accurate percentile calculation