     
     /// Creates a rating cell and returns it
     private func createRatingCell() -> LPRatingTableViewCell {
-        let cell = LPRatingTableViewCell(style: .default, reuseIdentifier: nil)
-        cell.delegate = self
+        guard let cell = ratingViewCell else {
+            // Create the cell
+            let newCell = LPRatingTableViewCell(style: .default, reuseIdentifier: nil)
+            newCell.delegate = self
+            if ratingViewCell == nil {
+                ratingViewCell = newCell
+            }
+            return newCell
+        }
+        
         return cell
     }
     

    }
    
    func ratingViewDidFinish(with statu: LPRatingViewCompletionStatus) {
        
    }
    
}

    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        // If section is for rating, then add the rating cell, else do normal cells
        if indexPath.section == ratingsSection {
            return createRatingCell()
        }
        
