correction in max pain calculation