refactor get averange rating number