changed to average error trace