scratch.py now calculates percentile from value