   func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
     tableView.deselectRow(at: indexPath, animated: true)
     let controller = RestaurantDetailViewController.fromStoryboard()
-    controller.titleImageURL = randomImageURL()
+    controller.titleImageURL = imageURL(from: restaurants[indexPath.row].name)
     controller.restaurant = restaurants[indexPath.row]
     controller.restaurantReference = documents[indexPath.row].reference
     self.navigationController?.pushViewController(controller, animated: true)

  return priceText
}

private func randomImageURL() -> URL {
  let randomImageNumber = Int(arc4random_uniform(22)) + 1
  let randomImageURLString =
  "https://storage.googleapis.com/firestorequickstarts.appspot.com/food_\(randomImageNumber).png"
  return URL(string: randomImageURLString)!
}

class RestaurantsTableViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {


    // Display data from Firestore, part two

    let image = imageURL(from: restaurant.name)
    thumbnailView.sd_setImage(with: image)
  }

  override func prepareForReuse() {
