added initial rating logic