public boolean sellBook(Book bookTOsell, int nrSellBooks, String buyer) {
		int index = bookList.getBookList().indexOf(bookTOsell);
		
		int remainingBook = bookList.getBookList().get(index).getQuantity()
				- nrSellBooks;
		bookList.getBookList().get(index).setQuantity(remainingBook);

		Sell sale = sellFactory.createSell();
		Book sellBook = sellFactory.createBook();
		sellBook.setAuthor(bookTOsell.getAuthor());
		sellBook.setTitle(bookTOsell.getTitle());
		sellBook.setGenre(bookTOsell.getGenre());
		sellBook.setQuantity(nrSellBooks);
		sellBook.setPrice(bookTOsell.getPrice());

		sale.setBook(sellBook);
		sale.setBuyer(buyer);
		GregorianCalendar gcal = new GregorianCalendar();
		XMLGregorianCalendar xgcal;
		try {
			xgcal = DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal);
			sale.setDate(xgcal);
		} catch (DatatypeConfigurationException e) {
			e.printStackTrace();
			return false;
		}

		sellList.getSellList().add(sale);
		
		SellXMLHandler sl=new SellXMLHandler();
		try {
			sl.writeToFile(sellList);
		} catch (JAXBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return true;
	}