         let indexPath = IndexPath(row: sender.tag, section: 0)
         if let cell = tableView.cellForRow(at: indexPath) as? PerformanceTableCell,
             let player = cell.player {
-
-            currentlyPlaying = cell
-
+            
             if !player.isPlaying {
+                currentlyPlaying = cell
                 player.play()
                 cell.playButton.setTitle("Stop", for: .normal)
             } else {
+                currentlyPlaying = nil
                 player.stop()
                 cell.playButton.setTitle("Play", for: .normal)
             }


        if let player = cell.player {
            for chirp in player.chirpViews {
                chirp.removeFromSuperview()
            }
        }

        if let cell = currentlyPlaying {
            cell.player!.stop()
            cell.playButton.setTitle("Play", for: .normal)
            currentlyPlaying = nil
        }
    }
}
