changed n samples to average to 16