use numpy for percentile calculation