Add ratings logic