Adjusted thresholds to match original
made pivot table sum instead of average