refactoring to be less db-reliant
add test to check rating convergence