         }
     }
 
+    func track(for row: Int) -> Track? {
+        guard let tracks = album?.tracks, row < tracks.count else { return nil }
+        let track = tracks[row]
+        return track
+    }
 
     func keyValue(for indexPath: IndexPath) -> KeyValuePair? {
         guard let album = album else { return nil }

    //MARK: Variables
    @IBOutlet weak var tableView: UITableView!

    var albumId: String!

    fileprivate var album: Album? {

        let height = KeyValueTableViewCell.height
        return height
    }

    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        guard indexPath.section == 3, let track = track(for: indexPath.row) else { return }
        player?.pause()
        player = Player(stream: track.streamUrl)
        player?.play()
    }
}

//MARK: Private Methods
