how to calculate pain and suffering