added avg rating and update of existing record