rating logic update