codes refactoring for text display of different rating result