Turned double pass 'average' into a single pass.