Added delegate methods to update the rating