@Override
	public boolean createLoan(Loan loan) {
		if (doc == null)
			return false;
		Element currRoot = doc.getRootElement();
		Element parrentLoan = currRoot.getChild("loanBooks");
		Element newLoan = new Element("loanBook");

		int id = 0;
		for (Loan item : getLoans()) {
			if (item.getLoanID() > id) {
				id = item.getLoanID();
			}
		}
		id++;
		newLoan.addContent(new Element("loanID").setText(id + ""));
		newLoan.addContent(new Element("isbn")
				.setText(loan.getBook().getIsbn()));
		newLoan.addContent(new Element("CustomerID").setText(loan.getCostumer()
				.getCustomerID() + ""));
		newLoan.addContent(new Element("startOfLoan").setText(loan
				.getStartOfLoan().toString()));
		newLoan.addContent(new Element("endOfLoan").setText(loan.getEndOfLoan()
				.toString()));

		parrentLoan.addContent(newLoan);

		return this.saveToFile();
	}