Updated reward calculation.