working on calc_avg_surprise