added ajax to avg_rating