how ratings work