added  avg_predict