Calculate rating

Line is too long. [99/80]