implement rating functions