Made the PercentileRank calculation generic