generate ratings and group types