debugging for result_avg