Extracted out percentile calculator into service for easier testing