Added rating and update functions for rating,did a few tests myself,it seems to work fine