fixed negative patch score error, added patch percentiles