Function rateComponent