Add rating functions.