spectrum averager made more efficient