add recalc_rating logic and test
Merge remote-tracking branch 'origin/master'