 let bookDict2: [String:Any] = [ "name" : "booktitle2" , "ISBNcode" : "23456789", "pic" : "", "notesCount": 12 ]
 var allBookArray: [Any] = [bookDict1, bookDict2]
 
-class BooklistViewController: UITableViewController, BarcodeScannerCodeDelegate {
+class BooklistViewController: UITableViewController, BarcodeScannerCodeDelegate, BarcodeScannerDismissalDelegate {
 
     @IBAction func addBookButton(_ sender: UIButton) {
     
         //Camera
         //Barcode
         
-        
-        
         let controller = BarcodeScannerController()
         controller.codeDelegate = self
+//        controller.errorDelegate = self
+        controller.dismissalDelegate = self
         
-        navigationController?.pushViewController(controller, animated: true)
+        present(controller, animated: true, completion: nil)
         
-        alertForCreateAccount()
         
     }
 

        return cell
    }
    

       /*
    // MARK: - Navigation

                let newBookDict: [String:Any] = [
                
                    "name" : booknameCreated,
                    "ISBNcode" : bookISBNCreated,
                    "pic" : bookImageCreated,
                    "notesCount" : 0
                ]
                
                allBookArray.append(newBookDict)
                print(allBookArray)
                self.tableView.reloadData()
                
            } else {
                
