updated rating.js