$$max = $y->[-1] if $y->[-1] > $$max;