public static void main(String[] args) {
        Library myLibrary = new Library();
        MySQLBookDAO bDao;

        initializeDB(myLibrary);

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
/*
        //myLibrary = new Library();
        myLibrary = new Library("input.csv");
        myLibrary.printCollection();

        System.out.println();
        System.out.println("Add Book B00006");
        System.out.println("+++++++++++++++");
        System.out.println();

        Book aNewBook = new Book("B00006", "Midsummer night's dream", "Shakespeare, William", true, null, "");
        myLibrary.addItem(aNewBook);
        myLibrary.printCollection();

        System.out.println();
        System.out.println("Remove Book B00001");
        System.out.println("++++++++++++++++++");
        myLibrary.removeItem("B00001");
        System.out.println();

        System.out.println("Remove Book B00004");
        System.out.println("++++++++++++++++++");
        myLibrary.removeItem("B00004");
        System.out.println();

        System.out.println("Remove Book B00007");
        System.out.println("++++++++++++++++++");
        myLibrary.removeItem("B00007");
        System.out.println();

        myLibrary.printCollection();
*/
        System.out.println();
        System.out.println("Enter Book");
        System.out.println("++++++++++");


        try{
            System.out.println("Enter a new item");
            System.out.println("Enter type (B=book)");
            String newType = br.readLine();
            if(newType.equals("B")){
                System.out.println("Enter a new reference:");
                String newReference = br.readLine();
                System.out.println("Enter title");
                String newTitle = br.readLine();
                System.out.println("Enter author");
                String newAuthor = br.readLine();
                Book b = new Book(newReference, newTitle, newAuthor, true, null, "");
                myLibrary.addItem(b);
                bDao = new MySQLBookDAO();
                bDao.add(b);
                bDao.closeAll();

            } else {
                System.out.println("You did not enter a correct type");
            }

        } catch (IOException ex) {
            System.err.println(ex);
        }
        //myLibrary.printCollection();

        System.out.println();
        System.out.println("Enter Item to remove");
        System.out.println("++++++++++++++++++++");
        try{
            System.out.println("Enter reference of the item you want to remove");
            String removeReference = br.readLine();
            bDao = new MySQLBookDAO();
            Book b = bDao.find(removeReference);
            if(b != null) {
                bDao.remove(b);
                myLibrary.removeItem(removeReference);
            }
            bDao.closeAll();


        } catch (IOException ex) {
            System.err.println(ex);
        }

        //myLibrary.printCollection();

        /*myLibrary.writeFile("output.csv");*/

        closeConnection();
    }