added a check for if _P was greater than _MaxP

calculate() was always using MaxP.
Merge pull request #2 from jsproull/master

added a check for if _P was greater than _MaxP