         currentPlayerController = nil
     }
     
-    private func attachPlayerToShelf() {
+    private func attachPlayerToShelf(_ shelf: ShelfViewController) {
         guard let playerController = currentPlayerController else { return }
-        
-        let shelf = videosController.detailViewController.shelfController
         
         shelf.addChildViewController(playerController)
         

            
            currentPlayerController = VideoPlayerViewController(player: playbackViewModel.player)
            
            attachPlayerToShelf()
        } catch {
            WWDCAlert.show(with: error)
        }

extension AppCoordinator: ShelfViewControllerDelegate {
    
    func shelfViewControllerDidSelectPlay(_ controller: ShelfViewController) {
        guard let viewModel = controller.viewModel.value else { return }
        
        do {
            let playbackViewModel = try PlaybackViewModel(sessionViewModel: viewModel, storage: storage)
