added a check for if _P was greater than _MaxP

calculate() was always using MaxP.