Avg rating code added