add rating and update avg rate