implemented the rating UI based on JSON response